import http from "@/utils/request"



// 获取基地对应鸽棚
export function getAllDovecoteNumber(id) {
  return http({
    url: `/breed/dovecote/getAllDovecoteNumber?baseId=${id}`,
    method: 'get',
  });
}

export function userslist(pagenum,pagesize,data) {
    return http({
      url: `/breed/drinking/list/${pagenum}/${pagesize}`,
      method: 'get',
      params:data
    });
}
export function edituser(userid,data) {
    return http({
      url: `/breed/drinking/update/${userid}`,
      method: 'post',
      data:data
    });
}
export function deleteuser(userid) {
    return http({
      url: `/breed/drinking/delete/${userid}`,
      method: 'delete'
    });
}
export function adduser(data) {
    return http({
      url: `/breed/drinking/save`,
      method: 'post',
      data:data
    });
}
export function multipledelete(data) {
  return http({
   url: `/breed/drinking/deleteList?idList=${data}`,
   method: 'delete',
  });
}
// 抽水泵信息
export function machinelist(current,size,data){
   return http({
     url:`/breed/drinking-machine/list/${current}/${size}`,
     method:'get',
     params:data
   })
}
export function addmachine(data){
  return http({
    url:`/breed/drinking-machine/save`,
    method:'post',
    data:data
  })
}
export function editmachine (id,data){
  return http({
    url:`/breed/drinking-machine/update/${id}`,
    method:'post',
    data:data
  })
}
export function deletemachine(mid){
   return http({
    url:`/breed/drinking-machine/delete/${mid}`,
    method:'delete',
   })
}
export function multimachinedelete(data) {
  return http({
   url: `/breed/drinking-machine/deleteList?idList=${data}`,
   method: 'delete',
  });
}
export function openmachine(mnumber) {
  return http({
   url: `/breed/drinking-machine/open?machineNumber=${mnumber}`,
   method: 'post',
  });
}
export function closemachine(data) {
  return http({
   url: `/breed/drinking-machine/shutdown/`,
   params:data,
   method: 'post',
  });
}